Inicio de sesion
The login method requests username and password in MD5
nuxibaIntegration.login("testAgent","a");
At the execution of the method, the agente receives the event onLogin or remoteLoginError
Closing session
This method executes only if the agent is on available status
nuxibaIntegration.closeSession();
At the execution of the method, the agente receives the event onLogOut o onError
Change Password
To change the password, the agent have to be on ready status. At the execution of the method, the agente receives the event (onPasswordUpdated) or an error (errorOnPasswordChange)
nuxibaIntegration.ChangePassword("passwordCurrent", "NewPassword");
Identifier
Gets the user's identifier
nuxibaIntegration.GetAgentID();
function onAgentId(UserID) {
console.log("agentId", UserID);
document.getElementById("UserIDTxt").value = UserID.data;
}
At the execution of the method, the agente receives the event agentId
User's name
Obtiene el nombre de usuario del agente
var username= GetUserName();
console.log(username);
Gets the agent's username.
Extension
Gets the extension previously registered in the system.
nuxibaIntegration.GetExtension();
/**
* @description obtiene la extension del usuario
* @param {json} Extension {data:-1}
*/
function onExtension(Extension) {
console.log("extension", Extension);
document.getElementById("ExtensionTxt").value = Extension.data;
}
At the execution of the method, the agente receives the event extension